package com.itheima.java.ai.langchin4j.config;

import dev.langchain4j.model.embedding.EmbeddingModel;
import dev.langchain4j.model.embedding.onnx.bgesmallenv15q.BgeSmallEnV15QuantizedEmbeddingModel;
import dev.langchain4j.store.memory.chat.ChatMemoryStore;
import com.itheima.java.ai.langchin4j.store.InMemoryChatMemoryStore;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Profile;
import org.springframework.context.annotation.Primary;

@Configuration
@Profile("test")
public class TestProfileAiConfig {

    @Bean
    @Primary
    public EmbeddingModel embeddingModel() {
        return new BgeSmallEnV15QuantizedEmbeddingModel();
    }

    @Bean
    @Primary
    public ChatMemoryStore chatMemoryStore() {
        return new InMemoryChatMemoryStore();
    }
} 